{layout name="../common/master"/}
<div id="right">
    <form action="" method="get" role="form">
        <div class="form-group">
            <label for="">姓名：</label>
            <input name="contact_name" {if condition="isset($_GET['contact_name'])"} value="{$_GET['contact_name']}" {/if} type="text"/>
            <input name="uid" hidden value="{$_GET['uid']}" type="text"/>

            <button type="submit" class="btn btn-primary">查询</button>
            <a href="{:URL('home/User/userList')}" class="btn btn-success">返回</a>
        </div>

    </form>
    <div>
        <button id="extend" type="submit" class="btn btn-info">导出到EXCEL</button>
    </div>
    <div class="panel panel-default col-lg-10">
        <div class="panel-heading">
            <h3 class="panel-title">用户通讯录</h3>
        </div>
        <div class="panel-body">
            <table class="table-bordered table  table-hover" style="margin-top: 20px;">
                <thead>
                <tr>
                    <th>序号</th>
                    <th>用户ID</th>
                    <th>手机号</th>
                    <th>联系人</th>
                    <th>联系人电话</th>
                    <th>关系</th>
                    <th>记录时间</th>
                    <th>创建时间</th>
                </tr>
                </thead>
                <tbody>
                {foreach name="data" item="vo" key="k"}
                <tr>
                    <th>{$vo['id']}</th>
                    <th>{$vo['user_id']}</th>
                    <th>{$vo['user_phone']}</th>
                    <th>{$vo['contact_name']}</th>
                    <th>{$vo['contact_phone_num']}</th>
                    <th>{$vo['relation']}</th>
                    <th>{$vo['record_time']}</th>
                    <th>{$vo['create_time']}</th>
                </tr>
                {/foreach}
                </tbody>
            </table>
        </div>
    </div>
    </div>
{$page} 总计数：{$totalCount}
</div>

<script>
    $("#extend").click(function () {
        var url="{:URL('home/User/usercontact',$_GET)}";
        url=url+"&extend=1";
        location.href=url;
    })
</script>